package day5;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        RentCompany a = new RentCompany();
        a.setName("神州行");
        a.setAdress("天水路");
        a.setNumber("18715173564");
        while (true) {
            a.show();
            System.out.println("1.查看车辆情况");
            System.out.println("2.租赁车辆");
            System.out.println("3.归还车辆");
            System.out.println("4.报废车辆");
            System.out.println("5.采购车辆");
            System.out.println("6.查看租赁记录");
            System.out.println("0.退出系统");
            System.out.println("请输入您的选择");
            int choice = input.nextInt();
            switch (choice) {
                case 1:
                    a.check();
                    break;
                case 2:
                    a.rentcar();
                    break;
                case 3:
                    System.out.println("请输入要还车辆车牌号");
                    String no = input.next();
                    a.ruturncar(no);
                    break;
                case 4:
                    System.out.println("请输入要报废车辆的车牌号");
                    String num = input.next();
                    a.scrap(num);
                    break;
                case 5:
                    a.buy();
                    break;
                case 6:
                    a.showsum();
                    break;
                default:
                    break;


            }if (choice==0){
                System.out.println("退出系统");
                break;
            }


        }
    }
}
